<template>
    <div>
        <h2>信息详情显示</h2>
        <table class="table table-bordered">
            <tr>
                <td>会员真实姓名</td>
                <td>{{ state.MemberName }}</td>
            </tr>
            <tr>
                <td>会员手机号</td>
                <td>{{ state.MemberPhone }}</td>
            </tr>
            <tr>
                <td>会员身份证号</td>
                <td>{{ state.Card }}</td>
            </tr>
            <tr>
                <td>会员图片</td>
                <td><img :src="'https://localhost:7272'+state.MemberPhoto" alt=""></td>
            </tr>
            <tr>
                <td>会员积分</td>
                <td>
                {{ state.Intergral }}</td>
            </tr>
            <tr>
                <td>会员余额</td>
                <td>{{ state.Money }}</td>
            </tr>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { reactive,toRefs,onMounted } from 'vue';
import { useRouter,useRoute } from 'vue-router';
const router= useRouter()
const route= useRoute()

const data=reactive({
    state:{}
})

const {state}=toRefs(data)
onMounted(()=>{
    getdata();
})

const getdata=()=>{
    axios({
        url:'/api/High/FantianId',
        method:'get',
        params:{
            Id:route.query.Id
        }
    })
    .then(res=>{
        console.log(res);
        state.value=res.data.data;
    })
    .catch(err=>{
        console.log(err);
    })
}


</script>

<style scoped>

</style>